﻿@using PNProject.EF;
@{
    ViewBag.Title = "Detail";
    Layout = "~/Views/Shared/_Layout1.cshtml";
    Library lib = (Library)(ViewData["lib"]);
    bool lang = (bool)(ViewData["lang"]);
    string langText = lang ? "" : "en-US/";
    List<Library> relative = (List<Library>)ViewData["relative"];
}
<div class="search-bv">
    <form name="input" action="/@string.Concat(langText,"libraries/search")" method="get">
        <input type="text" name="query" placeholder="Từ khóa" style="width:640px; height:16px; float:left; padding:5px 10px; border:1px solid #ddd; background:white; color:#333;" />
        <input type="submit" value="Search" style="width:68px; height:28px; float:right;" />
    </form>
</div>
<div class="thuvien">
    <div class="ttthuvien">
        <p style="font-weight:bold;">@lib.Title</p>
    </div>
    <div style="min-height:10px; overflow:hidden; background-color:White; float:left; width:720px; padding:10px;">
    @Html.Raw(lib.LibContent)
    <div style="float:left;">
        @if (lib.Type == 0)
        {
        <img src="/images/icon-18.png" />
        <a href="/libraries/golink/@lib.ElementID.ToString()" style="color:#EF8C27; font-weight:bold;">DOWNLOAD</a>
        }
        else
        {
        <img src="/images/icon-20.png" />
        <a href="/libraries/golink/@lib.ElementID.ToString()" style="color:#EF8C27; font-weight:bold;">XEM VIDEO</a>
        }
    </div>
    </div>
    


</div>
<script type="text/javascript">
    $(document).ready(function () {
        $(".titlesub p").empty();
        var lang = document.URL.indexOf("en-US") < 0 ? true : false;
        if (lang) {
            $(".titlesub p").append("Thư viện");
            $("#ulink_home a").append("Trang chủ");
            $("#ulink_child a").append("Thư viện");
            $("#ulink_child a").attr("href", "/libraries");
        }
        else {
            $(".titlesub p").append("Libraries");
            $("#ulink_home a").append("Home");
            $("#ulink_home a").attr("href", "/en-US/home");
            $("#ulink_child a").append("Libraries");
            $("#ulink_child a").attr("href", "/en-US/libraries");
        }
    });
</script>